import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import './styles/base.css'
import 'element-ui/lib/theme-chalk/index.css'
import '@/utils/permission'

Vue.config.productionTip = false
Vue.directive('active', {
  inserted(el) {
    el.onclick = (e) => {
      for (let k = 0; k < el.children.length; k++) {
        el.children[k].className = 'item'
      }
      e.target.classList.add('is-checked')
    }
  }
})

Vue.use(ElementUI)

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
